<template>
  <!-- 线索上报 -- 新增 -->
  <view class="clueAddition">
    <view class="wrapper">
      <view class="wrapper-item content">
        <u-form :model="form" ref="form" label-width="100" labelPosition="top" :error-type="errorType">
          <view style="padding-top: 20rpx"></view>
          <view class="text-AreaView">
            <u--textarea v-model="form.fZdgzJcyy" placeholder="请概括说明重点关注房屋解除原因" count maxlength="100"
              height="135"></u--textarea>
          </view>
        </u-form>
      </view>
    </view>

    <view class="btns thispageBtn">
      <button class="cancel-btn lt" type="primary" @click="navBack()">
        取消
      </button>
      <button class="submit-btn" type="primary" @click="submitHandle">
        保存
      </button>
    </view>
    <yy-watermark></yy-watermark>
  </view>
</template>

<script>
  import {
    ajaxGetDictItems,
    upzdszJsonssInfo
  } from "@/api/api.js";
  import {
    Toast,
    navBack,
    handleClickRouter,
    getOptionsParams,
    generateUrlOptions
  } from "@/utils/util.js";
  import moment from "@/utils/moment.js";
  import mixin from "@/utils/mixin.js";

  export default {
    name: "clueAddition",
    data() {
      return {
        baseImgUrl: this.$baseImgUrl,
        baseURL: this.$baseURL,
        imgPrefix: uni.getStorageSync("imgPrefix"),
        options: {},
        disputesDescription: "",
        form: this.initForm(),
        routerParams: {},
      };
    },
    onLoad(options) {
      this.routerParams = getOptionsParams(options)
    },
    onShow() {},

    onUnload() {},

    methods: {
      handleClickRouter,
      navBack,
      initForm() {
        return {
          fZdgzJcyy: ''
        }
      },
      async cellClick() {},

      showConfirm(e) {},

      async submitHandle() {
        let params = {
          fIszdgz: '0',
          fZdgzJcyy: this.form.fZdgzJcyy,
          fHouseid: this.routerParams.fHouseid
        }
        upzdszJsonssInfo(params)
          .then((res) => {
            Toast('解除成功！')
            // 跳转到 房屋详情页
            let params = generateUrlOptions(this.routerParams)
            setTimeout(() => {
              uni.reLaunch({
                url: `/actual_real_estate/real_estate_detail?params=${params}`
              })
            }, 500)
          })
      },
    },
  };
</script>

<style>
  page {
    background-color: #f3f3f3 !important;
    height: 100%;
  }
</style>
<style lang="scss" scoped>
  .clueAddition {
    flex: 1;
    background-color: #f3f3f3;

    .wrapper {
      position: absolute;
      top: 30rpx;
      left: 50%;
      transform: translateX(-50%);

      .wrapper-item {
        margin-bottom: 2vh;
        padding: 35rpx 30rpx;
        background-color: #ffffff;
        border-radius: 10rpx;
        width: 710rpx;
      }

      .content {
        margin: 0 auto;
        height: calc(100vh - 90px);
        overflow-y: auto;
      }

      /deep/.u-form-item__body__right__content {
        padding: 12rpx 18rpx;
        border-radius: 8rrpx;
        background: #f9f9f9;
      }

      /deep/.u-input__content {
        background: #f9f9f9;
      }

      .seleTime {
        width: 30rpx;
        height: 30rpx;
      }

      .forTitle {
        display: flex;
        position: relative;
        margin-bottom: 15rpx;
        font-size: 30rpx;

        .forReq {
          position: absolute;
          left: -9px;
          color: #f56c6c;
          line-height: 20px;
          font-size: 20px;
          top: 3px;
        }

        .state {
          color: #a1a1a1;
          font-size: 26rpx;
        }
      }

      .text-AreaView {

        /deep/.u-textarea,
        .u-textarea__count {
          background-color: #f9f9f9 !important;
        }

        .u-textarea__field {
          font-weight: 400;
        }

        /deep/ .input-placeholder {
          font-weight: 400;
        }
      }
    }

    .thispageBtn {
      position: absolute;
      width: 100vw;
      bottom: 0;
    }
  }
</style>